//
//  WCUserContext.h
//  WeboCon
//
//  Created by black sun on 12-3-3.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BaseSingleInstance.h"
#import "User.h"
#import "yoauth.h"
#import "WCUserDefaultHelper.h"

#define OAuthUserIdKey       @"uid"

#define UserDefaultKeyWithUid(var)   [NSString stringWithFormat:@"sina_uid_%@",[var stringValue]]

//存储当前用户的uid
#define CurrentUidKey                @"sina_current_uid"


@interface WCUserContext : BaseSingleInstance{
    NSString *accessToken;
    NSString *refreshtoken;
    NSNumber *expiresin;
    NSNumber *currentUserId;
    User *currentUser;
}

+(WCUserContext *)sharedInstance;
@property(nonatomic,strong) NSString *accessToken;
@property(nonatomic,strong) NSString *refreshtoken;
@property(nonatomic,strong) NSNumber *expiresin;
@property(nonatomic,strong) NSNumber *currentUserId;
@property(nonatomic,strong) User *currentUser;

-(BOOL)hasLogin;
-(void)saveOldUserData;

@end
